<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="ChequesTerceirosCreateDlg" widgetVar="ChequesTerceirosCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateChequesTerceirosTitle}">
            <h:form id="ChequesTerceirosCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{chequesTerceirosController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateChequesTerceirosLabel_id}" for="id" />
                        <p:inputText id="id" value="#{chequesTerceirosController.selected.id}" title="#{bundle.CreateChequesTerceirosTitle_id}" required="true" requiredMessage="#{bundle.CreateChequesTerceirosRequiredMessage_id}"/>
                        <p:outputLabel value="#{bundle.CreateChequesTerceirosLabel_dataModificacao}" for="dataModificacao" />
                        <p:calendar id="dataModificacao" pattern="MM/dd/yyyy" value="#{chequesTerceirosController.selected.dataModificacao}" title="#{bundle.EditChequesTerceirosTitle_dataModificacao}"  showOn="button"/>
                        <p:outputLabel value="#{bundle.CreateChequesTerceirosLabel_despesa}" for="despesa" />
                        <p:selectBooleanCheckbox id="despesa" value="#{chequesTerceirosController.selected.despesa}" />
                        <p:outputLabel value="#{bundle.CreateChequesTerceirosLabel_tipoTroco}" for="tipoTroco" />
                        <p:inputText id="tipoTroco" value="#{chequesTerceirosController.selected.tipoTroco}" title="#{bundle.CreateChequesTerceirosTitle_tipoTroco}" />
                        <p:outputLabel value="#{bundle.CreateChequesTerceirosLabel_valorTroco}" for="valorTroco" />
                        <p:inputText id="valorTroco" value="#{chequesTerceirosController.selected.valorTroco}" title="#{bundle.CreateChequesTerceirosTitle_valorTroco}" />
                        <p:outputLabel value="#{bundle.CreateChequesTerceirosLabel_dataTroco}" for="dataTroco" />
                        <p:calendar id="dataTroco" pattern="MM/dd/yyyy" value="#{chequesTerceirosController.selected.dataTroco}" title="#{bundle.EditChequesTerceirosTitle_dataTroco}"  showOn="button"/>
                        <p:outputLabel value="#{bundle.CreateChequesTerceirosLabel_observacaoTroco}" for="observacaoTroco" />
                        <p:inputText id="observacaoTroco" value="#{chequesTerceirosController.selected.observacaoTroco}" title="#{bundle.CreateChequesTerceirosTitle_observacaoTroco}" />
                        <p:outputLabel value="#{bundle.CreateChequesTerceirosLabel_fornecedor}" for="fornecedor" />
                        <p:selectOneMenu id="fornecedor" value="#{chequesTerceirosController.selected.fornecedor}" required="true" requiredMessage="#{bundle.EditChequesTerceirosRequiredMessage_fornecedor}">
                            <f:selectItems value="#{fornecedoresController.itemsAvailableSelectOne}"
                                           var="fornecedorItem"
                                           itemValue="#{fornecedorItem}"/>
                        </p:selectOneMenu>
                        <p:outputLabel value="#{bundle.CreateChequesTerceirosLabel_cheque}" for="cheque" />
                        <p:selectOneMenu id="cheque" value="#{chequesTerceirosController.selected.cheque}" required="true" requiredMessage="#{bundle.EditChequesTerceirosRequiredMessage_cheque}">
                            <f:selectItems value="#{chequesRecebidosController.itemsAvailableSelectOne}"
                                           var="chequeItem"
                                           itemValue="#{chequeItem}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{chequesTerceirosController.create}" value="#{bundle.Save}" update="display,:ChequesTerceirosListForm:datalist,:growl" oncomplete="handleSubmit(args,'ChequesTerceirosCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="ChequesTerceirosCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
